﻿define(function (require) {
    var service = require('ezdesk/utility/service');

    window.AppFunc = Backbone.Model.extend({
        initialize: function () {
            if (!this.get('Title')) {
                if (this.get('DisplayText')) {
                    this.set({ 'Title': this.get('DisplayText') });
                }
            }
            if (this.get('FuncUrl')) {
                var baseUrl = null;
                service.ClientBaseUrl_CacheSync(function (e) {
                    baseUrl = e;
                });
                var url = 'http://' + baseUrl + this.get('FuncUrl');
                this.set({ 'url': url });
            }
        }
    });


});
